package com.pig4cloud.pigx.wallet.api.v1.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.common.customize.api.annotation.OpenApi;
import com.pig4cloud.pigx.user.enums.UserApiKeyEnum;
import com.pig4cloud.pigx.wallet.api.v1.service.ContractAccountDetailServiceV1;
import com.pig4cloud.pigx.wallet.open.api.dto.OpenApiContractAccountDetailDTOV1;
import com.pig4cloud.pigx.wallet.open.api.vo.OpenApiContractAccountDetailVOV1;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 开放API - 合约账户明细 - v1版本
 *
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/v1/wallet/contract/account/detail" )
@Api(value = "api_contract_account_detail_v1", tags = "开放api-合约账户明细")
public class ContractAccountDetailControllerV1 {

	private final ContractAccountDetailServiceV1 service;

	/**
	 * 获取账户损益资金流水
	 * @param dto dto
	 * @return 流水
	 */
	@OpenApi(version = "1",permission = UserApiKeyEnum.Permission.READ,needSignature = true)
	@PostMapping("/page")
	public R<Page<OpenApiContractAccountDetailVOV1>> getUserList(@RequestBody OpenApiContractAccountDetailDTOV1 dto) {
		return service.getUserList(dto);
	}

}
